package com.fenyin.samples.study.jvm.gc;  
/**
 * VM args:-verbose:gc -Xms20M -Xmx20M -Xmn10M -XX:SurvivorRatio=8 -XX:+PrintGCDetails -XX:MaxTenuringThreshold=1 -XX:+PrintTenuringDistribution
 *@Title:  
 *@Description:  长期存活对象进入老年代
 *@Author:fengzhichao  
 *@Since:2012-8-25  
 *@Version:1.1.0
 */
public class LongObjAllocation {

	private static int _1MB = 1024*1024;
	
	public static void main(String[] args){
		byte[] allocation1 = new byte[_1MB/4];
		byte[] allocation2 = new byte[4*_1MB];
		byte[] allocation3 = new byte[4*_1MB];
		allocation3 = null;
		allocation3 = new byte[4*_1MB];
	}
}
